package com.youknowme.utility;

import android.content.Context;

import com.umeng.analytics.MobclickAgent;

public class LocalyticsHelper {

	public static void initLocalytics(Context context) {
		// 禁止默认的页面统计方式
		MobclickAgent.openActivityDurationTrack(false);
		// 离开界面后 判断新session
		MobclickAgent.setSessionContinueMillis(60000);
		// 更新服务配置
		MobclickAgent.updateOnlineConfig(context);
	}
	
	public static void startSession(Context context) {
		MobclickAgent.onResume(context);
	}
	
	public static void endSession(Context context) {
		MobclickAgent.onPause(context);
	}

	
	public static void tagScreenStart(Context context, String screenName) {
		MobclickAgent.onPageStart(screenName);
	}
	
	public static void tagScreenEnd(Context context, String screenName) {
		MobclickAgent.onPageEnd(screenName);
	}
}
